<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.zh.authority.model.*" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<title><%=Menu.TABLE_ALIAS%> 列表</title>
	<%@include file="/commons/jqueryeasyui.jsp" %>
  </head>
<body>	
	<script type="text/javascript" src="<c:url value="/admin/pages/Menu/list.js"/>"></script>
	<div class="easyui-layout" data-options="fit:true,border:false">
  		<div data-options="region:'north',title:'查询',split:true,doSize:false" style="height:80px;padding: 10px;">
  			<form id="menuSearchForm" method="post">
						<label><%=Menu.ALIAS_MENU_NAME%>：</label>
			  			<span>			 
			  				<input name="menuName" type="text">
			  			</span>	
			  			<label><%=Menu.ALIAS_MENU_LEVEL%>：</label>
			  			<span>			 
			  				<input name="menuLevel" type="text">
			  			</span>	
			  			<!-- 
						<label><%=Menu.ALIAS_MENU_VIEW_URL%>：</label>
			  			<span>			 
			  				<input name="menuViewUrl" type="text">
			  			</span>	
						<label><%=Menu.ALIAS_URL%>：</label>
			  			<span>			 
			  				<input name="url" type="text">
			  			</span>	
						<label><%=Menu.ALIAS_PARENT_ID%>：</label>
			  			<span>			 
			  				<input name="parentId" type="text">
			  			</span>	
						<label><%=Menu.ALIAS_IS_SHOW%>：</label>
			  			<span>			 
			  				<input name="isShow" type="text">
			  			</span>	
			  			 -->
  			<span>
  				<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="menuSearch();">查询</a>
  			</span>
  			</form>
  		</div>  
	    <div data-options="region:'center',title:'列表'" style="">
	    	<table id="menuTable" class="easyui-datagrid" 
	    		data-options="rownumbers:true,
	    			url:'<c:url value="/admin/pages/Menu/list.do"/>',
	    			fitColumns:true,singleSelect:false,
	    			pagination:true,fitColumns:true,idField:'id',
	    			fit:true,toolbar:'#menuTableToolBar',
	    			onLoadError:function(){
	    				$.messager.alert('服务器错误。');
	    			}">  
			    <thead>  
			        <tr> 
			        	<th data-options="checkbox:true"></th>
			            <th data-options="field:'menuName',sortable:true,width:30"><%=Menu.ALIAS_MENU_NAME%></th>  
			            <th data-options="field:'menuViewUrl',sortable:true,width:50"><%=Menu.ALIAS_MENU_VIEW_URL%></th>  
			            <th data-options="field:'url',sortable:true,width:30"><%=Menu.ALIAS_URL%></th>  
			            <th data-options="field:'menuLevel',sortable:true,width:10"><%=Menu.ALIAS_MENU_LEVEL%></th>  
			            <th data-options="field:'parentId',sortable:true,width:10"><%=Menu.ALIAS_PARENT_ID%></th>  
			            <th data-options="field:'isShow',sortable:true,width:30"><%=Menu.ALIAS_IS_SHOW%></th>  
			        </tr>  
			    </thead>  
			</table>  
	    </div>
    </div>
    <div id="menuTableToolBar">
    	<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="openMenuAddWin();">新增</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="openMenuEditWin();">编辑</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="menuDel('<c:url value="/admin/pages/Menu/delete.do"/>');">删除</a>
    </div>
    <div id="menuEditWin" class="easyui-window" style="overflow: hidden;"  
    	data-options="title:'编辑',closed:true,
	    width:400,   
	    height:240,  
	    modal:true,
	    resizable:false,
	    minimizable:false,
	    maximizable:false,
	    draggable:false,
	    collapsible:false
	    ">
    	 <div class="easyui-layout" data-options="closed:true,fit:true">  
	        <div data-options="region:'center',border:false" align="center">
	        	<form id="menuEditForm" method="post" action="<c:url value="/admin/pages/Menu/update.do"/>">
					<input id="id" type="hidden" name="id" />
	        	<table width="80%" border="0" style="font-size: 12px;">
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_MENU_NAME%>：</td>
		        			<td align="left">
		        				<input name="menuName" type="text" chinese="【<%=Menu.ALIAS_MENU_NAME%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_MENU_VIEW_URL%>：</td>
		        			<td align="left">
		        				<input name="menuViewUrl" type="text" chinese="【<%=Menu.ALIAS_MENU_VIEW_URL%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_URL%>：</td>
		        			<td align="left">
		        				<input name="url" type="text" chinese="【<%=Menu.ALIAS_URL%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_MENU_LEVEL%>：</td>
		        			<td align="left">
		        				<input name="menuLevel" type="text" chinese="【<%=Menu.ALIAS_MENU_LEVEL%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_PARENT_ID%>：</td>
		        			<td align="left">
		        				<input name="parentId" type="text" chinese="【<%=Menu.ALIAS_PARENT_ID%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_IS_SHOW%>：</td>
		        			<td align="left">
		        				<input name="isShow" type="text" chinese="【<%=Menu.ALIAS_IS_SHOW%>】" nullable="no">
		        			</td>
		        		</tr>
	        	</table>
	        	</form>
	        </div>  
	        <div data-options="region:'south',split:true,border:false" style="height:45px;padding-top: 5px;" align="right">  
	            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="menuEditSubmit();">保存</a>
				<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="$('#menuEditWin').window('close');">取消</a>
	        </div>  
    	</div>  
    </div>
    <div id="menuAddWin" class="easyui-window" style="overflow: hidden;" 
    	data-options="title:'新增',closed:true,
	    width:400,   
	    height:240,   
	    modal:true,
	    resizable:false,
	    minimizable:false,
	    maximizable:false,
	    draggable:false,
	    collapsible:false
    	">
    	 <div class="easyui-layout" data-options="closed:true,fit:true">  
	        <div data-options="region:'center',border:false" align="center" style="">
	        	<form id="menuAddForm" method="post" action="<c:url value="/admin/pages/Menu/save.do"/>">
	        	<table width="80%" border="0" style="font-size: 12px;">
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_MENU_NAME%>：</td>
		        			<td align="left">
		        				<input name="menuName" type="text" chinese="【<%=Menu.ALIAS_MENU_NAME%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_MENU_VIEW_URL%>：</td>
		        			<td align="left">
		        				<input name="menuViewUrl" type="text" chinese="【<%=Menu.ALIAS_MENU_VIEW_URL%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_URL%>：</td>
		        			<td align="left">
		        				<input name="url" type="text" chinese="【<%=Menu.ALIAS_URL%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_MENU_LEVEL%>：</td>
		        			<td align="left">
		        				<input name="menuLevel" type="text" chinese="【<%=Menu.ALIAS_MENU_LEVEL%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_PARENT_ID%>：</td>
		        			<td align="left">
		        				<input name="parentId" type="text" chinese="【<%=Menu.ALIAS_PARENT_ID%>】" nullable="no">
		        			</td>
		        		</tr>
						<tr>
		        			<td width="30%" align="right"><%=Menu.ALIAS_IS_SHOW%>：</td>
		        			<td align="left">
		        				<input name="isShow" type="text" chinese="【<%=Menu.ALIAS_IS_SHOW%>】" nullable="no">
		        			</td>
		        		</tr>
	        	</table>
	        	</form>
	        </div>  
	        <div data-options="region:'south',split:true,border:false" style="height:45px;padding-top: 5px;" align="right">  
	            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="menuAddSubmit();">保存</a>
				<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="$('#menuAddWin').window('close');">取消</a>
	        </div>  
    	</div>  
    </div>
  </body>
</html>
